
<?php include './application/views/top.php'; ?>
<script src="/resource/js/circle-progress.js"></script>
<div class="clear"></div>
<div style="width: 100%;height:240px;background: url('/resource/images/usercenter/usercenter_banner.jpg')"></div>


<div class="clear h50"></div>
<div class="layout uc">
	<?php include './application/views/user/left.php'; ?>
	<div class="right">
		<div class="big_frame">
        
        <div class="one">
        <div class="toubu"><img src="<?php echo $user['image'];?>" width="90" height="90"></div>
        <div class="yhm"><?php echo $user['username'];?></div>
        <div class="etb"><a href="/user/photo.html">修改头像</a></div>
        <ul class="yanz">
			<li><a href="/user/realname.html" title="实名验证" class="<?php if($user['real_status'] == 1){echo "y1y";}else{echo "y1n";}?>"></a></li>
			<li><a href="/user/phone.html" title="手机验证" class="<?php if($user['real_status'] == 1){echo "y2y";}else{echo "y2n";}?>"></a></li>
			<li><a href="/user/email.html" title="邮箱验证" class="<?php if($user['real_status'] == 1){echo "y3y";}else{echo "y3n";}?>"></a></li>
		</ul>
        </div>        
        <div class="two">
        	<span>可用余额（元）</span><h1>¥<?php echo $account['use_money'];?></h1>
            <span>冻结金额（元）</span><h1>¥<?php echo $account['no_use_money'];?></h1>
            <div style="clear:both;">
        	<i class="nal"><span><a href="/account/recharge.html" class="cz_an">充值</a></span></i>
            <i class="nal np"><span><a href="/account/cash.html" class="cz_u">提现</a></span></i>
            </div>
        </div>
        <div class="three">
        
        <dl>
        <dt>安全等级：</dt>
        <dd>
			<div class="progress-background ml10">
				<div class="progress-bar" style="width:<?php echo intval(($addup/7)*100);?>%"></div>
			</div>
		</dd>
        </dl>
        
        <dl>
        <dt>我的积分：<?php echo $credit_value;?>分</dt>
        </dl>
        <dl>
        <dt>会员等级：</dt>
        <dd><img src="<?php echo CON_STATIC_URL.'credit/'.$user_credit_img;?>" width="15" height="13"></dd>
        </dl> 
        </div>
	  </div>
         <div class="clear h1"></div>
         <div class="b_frame">
         <h2>资产总额：￥<?php echo number_format($account['total'],2);?>元</h2>
         <h2>总收益：￥<?php echo number_format($income_total);?>元</h2>
         <h2>待收本金：￥<?php echo number_format($collection_capital);?>元</h2>
         <h2>待回收利息：￥<?php echo number_format($collection_interest);?>元</h2>
         <h2>体验金&nbsp;  &nbsp;：<?php echo $account['reg_money'];?>元</h2>
         </div>
 	</div>
	<div class="title_tz">
    	<h3>投资统计</h3>
        <span><a href="/userborrow/success.html">查看更多</a></span>
    </div>
	<ul class="big_k">
    <li>项目名称</li>
    <li>年利率</li>
    <li>收益总额</li>
    <li>投资期限</li>
    <li>投资总额</li>
    <li>待收本息</li>
    <li>操作</li>
    </ul>
    <?php foreach($user_tender['tender_list'] as $tender) {?>
	<ul class="big_l">
    <li><?php echo $tender['title'];?></li>
    <li><?php echo $tender['apr'];?>%</li>
    <li><?php echo number_format($tender['repayment_account']);?>元</li>
    <li><?php echo $tender['is_day']?$tender['time_limit'].'天':$tender['time_limit'].'个月'; ?></li>
    <li><?php echo number_format($tender['account']);?>元</li>
    <li><?php echo number_format($tender['interest']);?>元</li>
    <li><a class="col-blue" href="/borrow/obj/<?php echo $tender['borrow_id']?>">查看</a></li>
    </ul>
    <?php }?>
	<div class="title_tz">
    	<h3>借款统计</h3>
        <span><a href="/userborrow/publish.html">查看更多</a></span>
        <span class="no">待还总金额：<i style="color:#c62721;">￥<?php echo number_format($repayment_total-$yrepayment_total,2);?></i><b>|</b></span>
    </div>
	<ul class="big_k">
    <li>项目名称</li>
    <li class="kl_220">代还本金</li>
    <li class="kl_220">待还利息/管理费</li>
    <li class="kl_220">下一还款日</li>
    <li>操作</li>
    </ul>
    <?php foreach($repayment_list as $repay) {?>
	<ul class="big_l">
    <li><?php echo $repay['title'];?></li>
    <li class="kl_220"><?php echo number_format($repay['capital'],2);?>元</li>
    <li class="kl_220"><?php echo number_format($repay['interest'],2);?>元</li>
    <li class="kl_220"><?php echo date("Y-m-d",$repay['repayment_time']);?></li>
    <li><a class="col-blue" href="/borrow/obj/<?php echo $repay['id']?>">查看</a></li>
    </ul>
    <?php }?>
	<div class="title_tz">
    	<h3>理财推荐</h3>
        <span class="no">已赚利息：<i style="color:#c62721;">￥<?php echo number_format($income_total);?></i></span>
    </div>
	<ul class="big_k">
    <li>项目名称</li>
    <li class="kl_165">年利率</li>
    <li class="kl_165">投资期限</li>
    <li class="kl_165">借款金额</li>
    <li class="kl_165">借款进度</li>
    <li>操作</li>
    </ul>
    <?php foreach($borrow_list as $borrow) {?>
	<ul class="big_l">
    <li><span title="<?php echo $borrow['title'];?>"><?php echo mb_substr($borrow['title'],0,4);?></span></li>
    <li class="kl_165"><?php echo $borrow['apr'];?>%</li>
    <li class="kl_165"><?php echo $borrow['time_limit'];?>个月</li>
    <li class="kl_165"><?php echo number_format($borrow['account']);?>元</li>
    <li class="kl_165"><?php echo ($borrow['account_yes']/$borrow['account'])*100;?>%</li>
    <li><a class="col-blue" href="/borrow/obj/<?php echo $borrow['id']?>">查看</a></li>
    </ul>
    <?php }?>
</div>
<div class="clear h50"></div>
<?php include "./application/views/footer.php";?>